package cn.openea.perpartner.meily.web.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.openea.perpartner.meily.web.mapper.BehaviorConfigMapper;
import cn.openea.perpartner.meily.web.entity.BehaviorConfig;
import cn.openea.perpartner.meily.web.service.IBehaviorConfigService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (BehaviorConfig)表服务实现类
 *
 * @author Weird077
 * @since 2023-06-09 16:09:09
 */
@Service("behaviorConfigService")
public class BehaviorConfigServiceImpl extends ServiceImpl<BehaviorConfigMapper, BehaviorConfig> implements IBehaviorConfigService {

    @Override
    public List<BehaviorConfig> selectBehaviorConfigList(BehaviorConfig behaviorConfig) {
        LambdaQueryWrapper<BehaviorConfig> wrapper = new LambdaQueryWrapper<>();
        if (StrUtil.isNotBlank(behaviorConfig.getConfigName())){
            wrapper.like(BehaviorConfig::getConfigName, behaviorConfig.getConfigName());
        }
        return list(wrapper);
    }
}

